<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<LINK rel="Shortcut Icon" href="../images/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/html5.js"></script>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/respond.min.js"></script>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/PIE_IE678.js"></script>
<![endif]-->

<!-- 本框架基本脚本和样式 -->
<link href="${path }/resource/plugin/hui/skin/default/skin.css"
	rel="stylesheet" type="text/css" id="skin" />
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/EXBase.js"></script>

<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->


<title>按钮管理</title>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
		系统管理<span class="c-gray en">&gt;</span> 管理员管理 <a
			class="btn btn-success radius r mr-20  size-S"
			style="line-height: 1.6em; margin-top: 3px"
			href="javascript:location.replace(location.href);" title="刷新"><i
			class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<form  method="post" id="serchForm" class="dataform" >
		<div class="pd-20" id="EXdataTable">
			<div class="text-c">
				<input type="text" name="name" placeholder="用户姓名" value="${name }"
					style="width: 250px" class="input-text">
				<button type="button" class="btn btn-success radius EXSerchBtn ">
					<i class="Hui-iconfont">&#xe665;</i>查找
				</button>
			</div>
			<div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l"> <a href="javascript:;"
					class="btn btn-danger radius size-S"
					onclick="EXGridTools.handleItems('EXdataTable','super/del',-1)"><i
						class="Hui-iconfont">&#xe6e2;</i>批量删除</a> <a href="javascript:;"
					class="btn btn-success radius  size-S" onclick="openAdd()"><i
						class="Hui-iconfont">&#xe600;</i>添加管理员</a>
				</span>
			</div>
			<div>
				<table 
					class="table table-border table-bordered table-bg table-hover table-sort">
					<thead>
						<tr class="text-c">
							<th width="40"><input name="" type="checkbox" value=""></th>
							<th width="80">序号</th>
							<th width="200">姓名</th>
							<th>所属公司</th>
							<th>账号</th>
							<th>电话</th>
							<th>注册时间</th>
							<th>账号状态</th>
							<th width="100">操作</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
				<div class="row cl pd-20">
				<div class="form-label col-4 text-l">
					显示 <select class="select" onchange="EXGridTools.changeSize('EXdataTable',this)"
						style="width: 80px;"><option value="10">10</option>
						<option value="20">20</option>
						<option value="50">50</option>
						<option value="100">100</option>
						<option value="200">200</option>
						<option value="500">500</option>
					</select> 条
				</div>
				<div class="col-8 text-r pagingBox" ></div>
			</div>
			</div>
		</div>
	</form>
	<script type="text/javascript">
	var exGrid=null;
	$(function() {
		exGrid=EXGrid().initGrid({
			c:true,
			fuBtnCheck:false,
			dataUrl:"super/showList",
			budinRow:function(loj){
				var html = "";
				for (var i = 0; i < loj.getRowCount(); i++) {
					html += '<tr class="text-c">' 
					+'<td><input  type="checkbox" value="' + loj.getString( i, "id") + '"></td>' 
					+'<td>' + (i + 1) + '</td>' 
					+'<td>' + loj.getString( i, "name") + '</td>' 
					+'<td >'+ loj.getString( i, "company.name") + '</td>' 
					+'<td >'+ loj.getString( i, "account") + '</td>' 
					+'<td >'+ loj.getString( i, "tel") + '</td>' 
					+'<td >'+ loj.getDate( i, "registerTime") + '</td>' 
					+'<td >'+ loj.getString( i, "accountStatus") + '</td>' 
					+'<td class="td-manage"><a '+ '		class="ml-5" onClick="openEdit('+loj.getString( i, "id")+')" href="javascript:;" title="编辑"><i'+ ' class="fa fa-lg fa-pencil-square-o"></i></a> '
					+'<a style="text-decoration: none" class="ml-5" onClick="EXGridTools.handleItems( \'EXdataTable\', \'super/del\',\''+loj.getString( i, "id")+'\')"'
							+ '		href="javascript:;" title="删除"><i class="fa fa-lg   fa-trash-o"></i></a>' + '	</td>'
							+ '</tr>'
				}
				return html;
			}
		});
		exGrid.loaDData();
	});
	
	
	//打开添加界面
	function openAdd() {
		layer.open({
			type : 2,
			title : "添加管理员",
			area : [ EXUI.SIZE_L, '450px' ],
			content : [ '${path}/super/editForm', 'no' ]
		}); 
	}
	//打开编辑界面
	function openEdit(id) {
		layer.open({
			type : 2,
			title : "编辑管理员",
			area : [ EXUI.SIZE_L, '450px' ],
			maxmin : true,
			content : [ '${path}/super/editForm?id=' + id,'no' ]
		});
	}
	</script>
</body>
</html>
